﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PDX
{
    /// <summary>
    /// An adapter capable of telling an <see cref="IPropertyModel"/>
    /// what its error message is.
    /// </summary>
    public interface IValidationAdapter
    {
        /// <summary>
        /// Gets the error message, if any.
        /// </summary>
        /// <param name="propModel">The prop model.</param>
        /// <returns></returns>
        string GetMessage(IPropertyModel propModel);

        /// <summary>
        /// Occurs when the validation result has changed.
        /// </summary>
        event EventHandler<EventArgs> ValidationChanged;
    }
}
